home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Burning & Media
/
GB-PVR 1.2.13
/
GBPVR10213.msi
/
Cabs.w1.cab
/
Manage.aspx.cs669
< prev
next >
Wrap
Text File
|
2008-04-09
|
31KB
|
697 lines
using System;
using System.Collections;
using System.Data.Common;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GBPVR.Public;
using GBPVRSchedule;
using gbweb.classes;
namespace gbweb
{
/// <summary>
/// Summary description for Manage.
/// </summary>
public partial class Manage : Page
{
private Settings guideParams;
protected ProgramTreeItem[] pgmTree;
protected int treeIdx;
private IList myScheduledRecordings;
private TableRow headerRow;
private TableCell colStatus;
private TableCell colAirDate;
private TableCell colChannel;
private TableCell colShow;
private TableRow recordingRow;
private Channel channel;
Hashtable channelCache = new Hashtable();
private void checkRecordingType(ref int recordingTypeFilter, string text, int value)
{
ListItem item = recordingTypes.Items.FindByValue(value.ToString());
int flag = (int)Math.Pow(2, value);
if (item == null)
{
item = new ListItem(text, value.ToString());
recordingTypes.Items.Add(item);
item.Selected = (recordingTypeFilter & flag) != 0;
}
else
{
if (item.Selected)
recordingTypeFilter = recordingTypeFilter | flag;
else
recordingTypeFilter = recordingTypeFilter & (0xffff - flag);
}
}
protected void Page_Load(object sender, EventArgs e)
{
Session["GuideStartTime"] = null;
guideParams = Global.Settings;
treeIdx = 0;
pgmTree = new ProgramTreeItem[1000];
HttpCookie cookie = Request.Cookies["recordingTypeFilter"];
int recordingTypeFilter = cookie != null ? Convert.ToInt32(cookie.Value) : 0xffbf;
//Check to see if the user selected the option for all filters or no filters and set the filter value accordingly
if (recordingTypes.SelectedValue == "all")
{
recordingTypeFilter = 65535;
//Set all the filter select boxes to true
for (int a = 0; a < recordingTypes.Items.Count; a++)
{
recordingTypes.Items[a].Selected = true;
}
//Uncheck the All and None options
recordingTypes.Items[0].Selected = false;
recordingTypes.Items[1].Selected = false;
}
else if (recordingTypes.SelectedValue == "none")
{
recordingTypeFilter = 65408;
//Set all the filter select boxes to false
for (int a = 0; a < recordingTypes.Items.Count; a++)
{
recordingTypes.Items[a].Selected = false;
}
}
checkRecordingType(ref recordingTypeFilter, "Pending", ScheduledRecording.STATUS_PENDING);
checkRecordingType(ref recordingTypeFilter, "In Progress", ScheduledRecording.STATUS_IN_PROGRESS);
checkRecordingType(ref recordingTypeFilter, "Available", ScheduledRecording.STATUS_COMPLETED);
checkRecordingType(ref recordingTypeFilter, "Failed", ScheduledRecording.STATUS_COMPLETED_WITH_ERROR);
checkRecordingType(ref recordingTypeFilter, "Conflict", ScheduledRecording.STATUS_CONFLICT);
checkRecordingType(ref recordingTypeFilter, "Reoccurring", ScheduledRecording.STATUS_PLACE_HOLDER);
checkRecordingType(ref recordingTypeFilter, "Deleted", ScheduledRecording.STATUS_DELETED);
cookie = new HttpCookie("recordingTypeFilter", recordingTypeFilter.ToString());
cookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(cookie);
if (!IsPostBack)
{
//Set the magic RSS links so IE and Firefox can sense the available RSS feeds
string url = Request.Url.ToString().Replace(Request.Url.Scheme + Uri.SchemeDelimiter + Request.Url.Authority,Request.Url.Scheme + Uri.SchemeDelimiter + Request.Headers["Host"]);
try
{
url = url.Substring(0, url.IndexOf("/gbpvr/"));
}
catch
{
url = url.Substring(0, url.IndexOf("/gbweb/"));
}
in_progressLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=in-progress");
completedLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=completed");
pendingLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=pending");
conflictLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=conflict");
failedLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=failed");
seasonLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=season");
deletedLinkH.Attributes.Add("href", url + "/gbpvr/public/rss.aspx?filter=deleted");
cookie = Request.Cookies["mr_showSearchResults"];
mr_searchResults.SelectedValue = cookie != null ? cookie.Value : "table";
//If the user has opted to use the TreeView search results allow the user to see the sort order
//options otherwise do not show them
if (mr_searchResults.SelectedValue == "tree")
{
treeView.Visible = true;
TreeView1.Visible = true;
footer.Visible = false;
tableView.Visible = false;
//If the user has ExtendedEWA then dynamicaly add a button for Star Rating sort
//and for original air date secondary sort
if (ExtendedEWA.Initialize())
{
ListItem starRating = new ListItem();
starRating.Text = "Star Rating";
starRating.Value = "mr_star";
srtOrder.Items.Add(starRating);
ListItem originalAirDate = new ListItem();
originalAirDate.Text = "Original Air Date (oad)";
originalAirDate.Value = "mr_original_date";
srtOrder.Items.Add(originalAirDate);
}
//Set the selected search order to whatever was used the last time
cookie = Request.Cookies["mr_SortOrder"];
srtOrder.SelectedValue = cookie != null ? cookie.Value : "mr_title";
cookie = Request.Cookies["mr_SecondarySortOrder"];
sec_srtOrder.SelectedValue = cookie != null ? cookie.Value : "mrs_title";
}
else
{
treeView.Visible = false;
TreeView1.Visible = false;
footer.Visible = true;
tableView.Visible = true;
}
}
else
{
if (mr_searchResults.SelectedValue == "tree")
{
//Store the selected sort order in the cookie for the next search
cookie = new HttpCookie("mr_SortOrder", srtOrder.SelectedValue);
cookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(cookie);
//Store the selected secondary sort order in the cookie for the next search
cookie = new HttpCookie("mr_SecondarySortOrder", sec_srtOrder.SelectedValue);
cookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(cookie);
treeView.Visible = true;
TreeView1.Visible = true;
footer.Visible = false;
tableView.Visible = false;
}
else
{
treeView.Visible = false;
TreeView1.Visible = false;
footer.Visible = true;
tableView.Visible = true;
}
//Store the selected display (table or tree) in the cookie for the next search
cookie = new HttpCookie("mr_showSearchResults", mr_searchResults.SelectedValue);
cookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(cookie);
}
Schedule scheduleHelper = Global.Schedule;
ProgrammeDisplay displayProgramme = new ProgrammeDisplay();
string cancel = Request.Params["cancel"];
if ((cancel != null) && (cancel.Length > 0))
{
ScheduledRecording scheduledRecording = scheduleHelper.GetScheduledRecordingByOID(Convert.ToInt32(cancel));
if (scheduledRecording != null)
{
scheduleHelper.CancelScheduledRecording(scheduledRecording);
}
}
if (mr_searchResults.SelectedValue != "tree")
{
foreach (string param in Request.Params.Keys)
{
if (param.StartsWith("item"))
{
ScheduledRecording scheduledRecording =
scheduleHelper.GetScheduledRecordingByOID(int.Parse(param.Substring(4)));
if (scheduledRecording != null)
{
scheduleHelper.CancelScheduledRecording(scheduledRecording);
}
}
}
}
myScheduledRecordings = scheduleHelper.LoadRecordingSchedule();
foreach (ScheduledRecording scheduledRecording in myScheduledRecordings)
{
int oid = scheduledRecording.getChannelOID();
if (!channelCache.Contains(oid))
{
channel = scheduleHelper.GetChannelByOID(oid);
channelCache.Add(oid, channel);
}
}
if (mr_searchResults.SelectedValue == "table")
{
cookie = Request.Cookies["sortOrder"];
string sortOrder = cookie != null ? cookie.Value.Trim(',') : "datetime,channel,title,status";
ArrayList sortOrders = new ArrayList(sortOrder.Split(','));
string newSort = Request["sort"];
if (newSort != null)
{
if (sortOrders.Contains(newSort))
{
if (sortOrders[0].ToString() == newSort)
{
sortOrders.Remove(newSort);
sortOrders.Insert(0, newSort + " desc");
}
else
{
sortOrders.Remove(newSort);
sortOrders.Insert(0, newSort);
}
}
else
{
sortOrders.Remove(newSort + " desc");
sortOrders.Insert(0, newSort);
}
}
sortOrder = string.Join(",", (string[])sortOrders.ToArray(typeof(string)));
cookie = new HttpCookie("sortOrder", sortOrder);
cookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(cookie);
// put table header
headerRow = new TableRow();
//Guest Users do not get access to initiatie, delete or cancel recordings.
if (Convert.ToBoolean((string)Session["NotGuestUser"]))
{
TableCell col1 = new TableCell();
col1.Text =
"<input type=\"checkbox\" class=\"selectall\" onclick=\"SelectAllCheckboxes(this);\"><b>Select</b>";
col1.Text +=
"<a id=\"massCancel\" class=\"btn-normal-small-red\" href=\"javascript:__doPostBack('massCancel','')\"><span>Delete</span></a>";
col1.CssClass = "header";
col1.Width = 25;
headerRow.Cells.Add(col1);
}
colStatus = new TableCell();
colStatus.Text = "<a href=\"?sort=status\"><b>Status</b></a>" + getSortDescription(sortOrders[0], "status");
colStatus.CssClass = "header";
colStatus.Width = 150;
colStatus.Wrap = false;
headerRow.Cells.Add(colStatus);
colAirDate = new TableCell();
colAirDate.Text = "<a href=\"?sort=datetime\">Air Date</a>" + getSortDescription(sortOrders[0], "datetime");
colAirDate.CssClass = "header";
colAirDate.Wrap = false;
headerRow.Cells.Add(colAirDate);
colChannel = new TableCell();
colChannel.Text = "<a href=\"?sort=channel\">Channel</a>" + getSortDescription(sortOrders[0], "channel");
colChannel.CssClass = "header";
colChannel.Wrap = false;
headerRow.Cells.Add(colChannel);
colShow = new TableCell();
colShow.Text = "<a href=\"?sort=title\">Show</a>" + getSortDescription(sortOrders[0], "title");
colShow.CssClass = "header";
colShow.Wrap = false;
colShow.Width = 350;
headerRow.Cells.Add(colShow);
schedView.Rows.Add(headerRow);
if (myScheduledRecordings is ArrayList)
((ArrayList)myScheduledRecordings).Sort(new RecordingComparer(sortOrders, channelCache));
}
bool strmAllowed = File.Exists(Path.Combine(guideParams.strmVLCLoc, "vlc.exe"));
foreach (ScheduledRecording scheduledRecording in myScheduledRecordings)
{
int flag = (int)Math.Pow(2, scheduledRecording.getRecordingStatus());
if ((recordingTypeFilter & flag) == 0) continue;
recordingRow = new TableRow();
recordingRow.CssClass = "manage_recordings_row";
TableCell detailCol1 = new TableCell();
if (scheduledRecording != null)
{
detailCol1.Text = "<input name=\"item" + scheduledRecording.getOID() + "\" type=\"checkbox\" value=\"" + scheduledRecording.getOID() + "\">";
}
colStatus = new TableCell();
colStatus.VerticalAlign = VerticalAlign.Top;
colAirDate = new TableCell();
colAirDate.VerticalAlign = VerticalAlign.Top;
colAirDate.Wrap = false;
colChannel = new TableCell();
colChannel.VerticalAlign = VerticalAlign.Top;
colShow = new TableCell();
colShow.VerticalAlign = VerticalAlign.Top;
String quality;
switch (scheduledRecording.getQualitySetting())
{
case (int)Schedule.Quality.Low:
quality = "Low";
break;
case (int)Schedule.Quality.Medium:
quality = "Medium";
break;
case (int)Schedule.Quality.High:
quality = "High";
break;
case (int)Schedule.Quality.Custom1:
quality = "Custom 1";
break;
case (int)Schedule.Quality.Custom2:
quality = "Custom 2";
break;
case (int)Schedule.Quality.LiveTV:
quality = "LiveTV";
break;
default:
quality = string.Empty;
break;
}
Programme programme = scheduledRecording.getProgramme();
channel = (Channel)channelCache[scheduledRecording.getChannelOID()];
if (mr_searchResults.SelectedValue == "table")
{
switch (scheduledRecording.getRecordingStatus())
{
case ScheduledRecording.STATUS_PENDING:
colStatus.CssClass = "pending";
colStatus.Text = "<span class=\"title\">" + "Pending<br/>" +
"<img src=\"public/t.gif\" width=\"1\" height=\"4\"/><br/>" +
"Quality: <i>" + quality + "</i><br>" + "</span>" +
"<a href=\"Manage.aspx?cancel=" + scheduledRecording.getOID() + "\" class=\"btn-normal-small-red\"><span>Cancel Recording</span></a>";
break;
case ScheduledRecording.STATUS_IN_PROGRESS:
colStatus.CssClass = "inprogress";
colStatus.Text = "<span class=\"title\">" + "In Progress<br/>" +
"<img src=\"public/t.gif\" width=\"1\" height=\"4\"/><br/>" +
"Quality: <i>" + quality + "</i><br>" + "</span>" +
"<a href=\"" + Download.GetDownloadUrl(false, false, scheduledRecording.getOID()) + "\" class=\"btn-normal-small\"><span>Play Program</span></a>" +
"<a href=\"" + Download.GetDownloadUrl(true, true, scheduledRecording.getOID()) + "\" class=\"btn-normal-small\"><span>Download</span></a>";
if (strmAllowed)
{
colStatus.Text += "<a href=\"public/Player.aspx?rid=" + scheduledRecording.getOID() + "&type=mr" + "\" onclick=\"EditPop5(this.href,'Add1');return false;\" class=\"btn-normal-small\"><span>Stream</span></a>";
}
if (programme == null)
{
colStatus.Text += "<a href=\"Manage.aspx?cancel=" + scheduledRecording.getOID() + "\" class=\"btn-normal-small-red\"><span>Cancel Recording</span></a>";
}
break;
case ScheduledRecording.STATUS_COMPLETED:
colStatus.CssClass = "available";
colStatus.Text = "<span class=\"title\">" + "Available<br/>" +
"<img src=\"public/t.gif\" width=\"1\" height=\"4\"/><br/>" +
"Quality: <i>" + quality + "</i><br>" + "</span>" +
"<a href=\"" + Download.GetDownloadUrl(false, false, scheduledRecording.getOID()) + "\" class=\"btn-normal-small\"><span>Play Program</span></a>" +
"<a href=\"" + Download.GetDownloadUrl(true, true, scheduledRecording.getOID()) + "\" class=\"btn-normal-small\"><span>Download</span></a>";
if (strmAllowed)
{
colStatus.Text += "<a href=\"public/Player.aspx?rid=" + scheduledRecording.getOID() + "&type=mr" + "\" onclick=\"EditPop5(this.href,'Add1');return false;\" class=\"btn-normal-small\"><span>Stream</span></a>";
}
if (programme == null)
{
colStatus.Text += "<a href=\"Manage.aspx?cancel=" + scheduledRecording.getOID() + "\" class=\"btn-normal-small\"><span>Delete</span></a>";
}
break;
case ScheduledRecording.STATUS_COMPLETED_WITH_ERROR:
colStatus.CssClass = "failed";
colStatus.Text = "<span class=\"title\">" + "Failed<br/>" +
"<img src=\"public/t.gif\" width=\"1\" height=\"4\"/><br/>" +
"Quality: <i>" + quality + "</i><br>" + "</span>" +
"<a href=\"Manage.aspx?cancel=" + scheduledRecording.getOID() + "\" class=\"btn-normal-small\"><span>Delete</span></a>";
break;
case ScheduledRecording.STATUS_CONFLICT:
colStatus.CssClass = "conflict";
colStatus.Text = "<span class=\"title\">" + "Conflict<br/>" +
"<img src=\"public/t.gif\" width=\"1\" height=\"4\"/><br/>" +
"Quality: <i>" + quality + "</i><br>" + "</span>" +
"<a href=\"Manage.aspx?cancel=" + scheduledRecording.getOID() + "\" class=\"btn-normal-small\"><span>Delete</span></a>";
break;
case ScheduledRecording.STATUS_PLACE_HOLDER:
colStatus.CssClass = "reoccurring";
colStatus.Text = "<span class=\"title\">" + "Reoccurring<br/>" + "</span>" +
"<img src=\"public/t.gif\" width=\"1\" height=\"4\"/><br/>" +
"Quality: <i>" + quality + "</i><br>" + "</span>" +
"<a href=\"Manage.aspx?cancel=" + scheduledRecording.getOID() + "\" class=\"btn-normal-small-red\"><span>Cancel Recording</span></a>";
break;
case ScheduledRecording.STATUS_DELETED:
colStatus.CssClass = "deleted";
colStatus.Text = "<span class=\"title\">" + "Deleted<br/>" + "</span>";
detailCol1.Text = string.Empty;
break;
default:
colStatus.Text = "NONE!!";
detailCol1.Text = string.Empty;
break;
}
// show air date
string date = null;
string time = null;
string days = string.Empty;
switch (scheduledRecording.getRecordingType())
{
case ScheduledRecording.TYPE_RECORD_ONCE:
date = scheduledRecording.getStartTime().ToLongDateString();
time = scheduledRecording.getStartTime().ToShortTimeString() + " - " + scheduledRecording.getEndTime().ToShortTimeString();
break;
case ScheduledRecording.TYPE_RECORD_DAILY:
date = "Daily";
time = scheduledRecording.getStartTime().ToShortTimeString() + " - " + scheduledRecording.getEndTime().ToShortTimeString();
break;
case ScheduledRecording.TYPE_RECORD_WEEK_DAYS:
date = "Week Days";
time = scheduledRecording.getStartTime().ToShortTimeString() + " - " + scheduledRecording.getEndTime().ToShortTimeString();
break;
case ScheduledRecording.TYPE_RECORD_WEEKEND_DAYS:
date = "Weekend Days";
time = scheduledRecording.getStartTime().ToShortTimeString() + " - " + scheduledRecording.getEndTime().ToShortTimeString();
break;
case ScheduledRecording.TYPE_RECORD_WEEKLY:
date = "Weekly: " + scheduledRecording.getStartTime().DayOfWeek.ToString();
time = scheduledRecording.getStartTime().ToShortTimeString() + " - " + scheduledRecording.getEndTime().ToShortTimeString();
break;
case ScheduledRecording.TYPE_RECORD_SEASON:
date = "Season";
if (scheduledRecording.getStartTime().Year != 2001)
time = scheduledRecording.getStartTime().ToShortTimeString() + " - " + scheduledRecording.getEndTime().ToShortTimeString();
if (scheduledRecording != null)
{
days = scheduleHelper.getSeasonDayString(scheduledRecording);
}
break;
}
colAirDate.Text = "" + date + "<br>" + time;
if (days != string.Empty)
{
colAirDate.Text += "<br>" + days;
}
// show channel
if (channel != null)
{
string channelName = channel.getName();
if (channelName.StartsWith(channel.getChannelNumber().ToString())) // cosmetic stuff for my american friends
{
if (channelName != channel.getChannelNumber().ToString())
{
channelName = channelName.Substring(channel.getChannelNumber().ToString().Length + 1);
}
else
{
channelName = "";
}
}
colChannel.Text = "<span class=\"channelnumber\"><b>" + channel.getChannelNumber() + "</b></span><br><span class=\"channelname\"><nobr>" + channelName + "</nobr></span>";
}
displayProgramme.FillProgrammeDisplay(Server, colShow, programme, scheduledRecording, false);
colStatus.CssClass = colShow.CssClass + " " + colStatus.CssClass;
colAirDate.CssClass = colShow.CssClass;
colChannel.CssClass = colShow.CssClass;
//Guest Users do not get access to initiatie, delete or cancel recordings.
if (Convert.ToBoolean((string)Session["NotGuestUser"]))
{
recordingRow.Cells.Add(detailCol1);
}
recordingRow.Cells.Add(colStatus);
recordingRow.Cells.Add(colAirDate);
recordingRow.Cells.Add(colChannel);
recordingRow.Cells.Add(colShow);
schedView.Rows.Add(recordingRow);
}
else
{
//Create a ProgrammeTreeItem to be loaded with the correct display information for the program
ProgramTreeItem treeItem = new ProgramTreeItem();
displayProgramme.FillProgrammeTreeArrayItem(treeItem, Server, programme, scheduledRecording, true, channel);
//Add the loaded ProgrammeTreeITem to the Array
pgmTree[treeIdx] = treeItem;
treeIdx = treeIdx + 1;
}
}
if (mr_searchResults.SelectedValue == "tree")
{
//Resize the array of ProgrammeTreeItems so that is isn't hogging up space.
Array.Resize(ref pgmTree, treeIdx);
TreeView1.Nodes.Clear();
//Fill the TreView Control with all the nodes in the correct format
displayProgramme.FillProgrammeTree(TreeView1, pgmTree, srtOrder.SelectedValue, sec_srtOrder.SelectedValue);
displayProgramme.Dispose();
}
}
string getSortDescription(object selectedSort, string thisSort)
{
if (selectedSort.ToString() == thisSort)
return " (asc)";
else if (selectedSort.ToString() == thisSort + " desc")
return " (desc)";
else
return string.Empty;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
class RecordingComparer : IComparer
{
IList sortKeys;
Hashtable channelCache;
public RecordingComparer(IList SortKeys, Hashtable ChannelCache)
{
sortKeys = SortKeys;
channelCache = ChannelCache;
}
IComparable getRecordingValue(object obj, string key)
{
ScheduledRecording scheduledRecording = (ScheduledRecording)obj;
switch (key)
{
case "status":
{
switch (scheduledRecording.getRecordingStatus())
{
case ScheduledRecording.STATUS_PENDING:
return "Pending";
case ScheduledRecording.STATUS_IN_PROGRESS:
return "In Progress";
case ScheduledRecording.STATUS_COMPLETED:
return "Available";
case ScheduledRecording.STATUS_COMPLETED_WITH_ERROR:
return "Failed";
case ScheduledRecording.STATUS_CONFLICT:
return "Conflict";
case ScheduledRecording.STATUS_PLACE_HOLDER:
return "Reoccurring";
case ScheduledRecording.STATUS_DELETED:
return "Deleted";
default:
return "NONE!!";
}
}
case "datetime":
{
switch (scheduledRecording.getRecordingType())
{
case ScheduledRecording.TYPE_RECORD_ONCE:
return scheduledRecording.getStartTime().Ticks;
default:
return scheduledRecording.getStartTime().TimeOfDay.Ticks;
}
}
case "channel":
{
Channel channel = (Channel)channelCache[scheduledRecording.getChannelOID()];
if (channel != null)
{
return channel.getChannelNumber();
}
return 0;
}
case "title":
{
Programme programme = scheduledRecording.getProgramme();
switch (scheduledRecording.getRecordingType())
{
case ScheduledRecording.TYPE_RECORD_ONCE:
if (programme == null)
{
return "Manual Recording";
}
else
{
if (programme.getSubTitle().Length > 0)
{
return programme.getTitle() + ": " + programme.getSubTitle();
}
else
{
return programme.getTitle();
}
}
default:
return scheduledRecording.getFileName();
}
}
default:
return string.Empty;
}
}
#region IComparer Members
public int Compare(object x, object y)
{
for (int i = 0; i < sortKeys.Count; i++)
{
string key = sortKeys[i].ToString();
int order = 1;
if (key.EndsWith(" desc"))
{
key = key.Substring(0, key.Length - 5);
order = -1;
}
int result = getRecordingValue(x, key).CompareTo(getRecordingValue(y, key));
if (result != 0) return result * order;
}
return 0;
}
#endregion
}
//protected void LinkButton1_Click(object sender, EventArgs e)
//{
// return;
//}
}
}